package com.ylkj.ylboss.freemark.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.ylkj.common.entity.LawyerInfo;
import com.ylkj.common.entity.QuestionInfo;
import com.ylkj.common.entity.UserInfo;
import com.ylkj.member.service.LawyerInfoService;
import com.ylkj.member.service.QuestionInfoService;
import com.ylkj.member.service.UserInfoService;

@Controller
@RequestMapping("/laywer")
public class LaywerInfoController {
    private static final Logger logger = LoggerFactory.getLogger(LaywerInfoController.class);
	
    @Autowired
	private LawyerInfoService lawyerInfoService;
    
    @Autowired
 	private UserInfoService userInfoService;
    
    @Autowired
 	private QuestionInfoService questionInfoService;
    
    
    
    @RequestMapping("/index")  
    public ModelAndView Add(HttpServletRequest request, HttpServletResponse response) {  
  
    	List<UserInfo> userInfoList = userInfoService.getUserInfoByNickName("aa");
    	List<QuestionInfo> QuestionInfoList = questionInfoService.queryQuestionInfoByPara(null);
    	List<LawyerInfo> layers = lawyerInfoService.queryLawyerInfoByPara(null);
//    	LawyerInfo lawyerInfo = new LawyerInfo();  
//    	lawyerInfo.setLawyerName("张三");
//    	lawyerInfo.setCertificateNo("13000000000");
//    	lawyerInfo.setPhoneNum("1234");
//        List<LawyerInfo> lawyerInfos = new ArrayList<LawyerInfo>();  
//        lawyerInfos.add(lawyerInfo);  
    	return new ModelAndView("lawyerInfo", "layers", layers); 
    }  
}
